import { VxeTablePropTypes,VxeColumnPropTypes } from 'vxe-table'



const tableOption = {
  table: {
    height: 400,
    align: 'center',
    size: 'small',
    opIcon:true,
    round: true,
    columnConfig: { resizable: true },
    maxHeight: 500,
    stripe: true,
    operate:false
  },
  column: [
    {
      type: 'radio',//类型：checkbox复选框 radio单选框  seq序号   类型string 非必传
      width: '60', //列宽 类型string
      align: 'center',
      fixed:'left',
      visible: true
    },
    {
      field: 'title',
      title: '博客标题', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip',
    },
    {
      field: 'author',
      title: '博客作者', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'preface',
      title: '博客简介', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'content',
      title: '博客内容', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'createTime',
      title: '博客创建时间', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'ip',
      title: 'IP', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'address',
      title: '地址', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'system',
      title: '设备系统', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'browser',
      title: '设备浏览器', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'view',
      title: '浏览量', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'comment',
      title: '评论量', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'like',
      title: '点赞量', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'tagType',
      title: '博客标签', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'img',
      title: '博客主图', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'firstClass',
      title: '博客一级分类', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip',
    },
    {
      field: 'secondClass',
      title: '博客二级分类', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip'
    },
    {
      field: 'isSelected',
      title: '是否精选', 
      minWidth:120, 
      sortable: false, 
      resizable:true, 
      visible: true, 
      align: 'center',
      showOverflow: 'tooltip',
      formatter:<VxeColumnPropTypes.Formatter>(({ cellValue, row, column }) => {
        return cellValue == '0'?'是':'否'
      }),
    },
  ],
  form:{
    labelPosition:'right',
    labelWidth:80,
    statusIcon:false,
    validateOnRuleChange:true,
    size:'default',
    scrollToError: true,
    span:6,
    items:[
      {
        prop:'title',
        label:'博客标题',
        labelWidth:80,
        inputType:'input',
        span:6,
        placeholder:'',
        clearable:true,
        disabled:false,
        prefixIcon:'',
        suffixIcon:'',
        readonly:false,
        type:'text'
      },
      {
        prop:'author',
        label:'博客作者',
        labelWidth:80,
        inputType:'input',
        span:6,
        placeholder:'',
        clearable:true,
        disabled:false,
        prefixIcon:'',
        suffixIcon:'',
        readonly:false,
        type:'text'
      },
      {
        prop:'createTime',
        label:'创建时间',
        labelWidth:80,
        inputType:'date',
        span:6,
        placeholder:'',
        clearable:true,
        disabled:false,
        readonly:false,
        startPlaceholder:'',
        endPlaceholder:'',
        format:'YYYY-MM-DD',
        rangeseparator:'至',
        valueFormat:'YYYY-MM-DD',
        unlinkPanels:true,
        disabledDate:null,
        type:'date'
      },
    ]
  }
}

export default tableOption